import React from 'react';
import ReactDOM from 'react-dom';
import Router from './router'
import './index.css';
import 'antd/dist/antd.css';
import * as serviceWorker from './serviceWorker';
import {Provider} from 'react-redux'
import {PersistGate} from 'redux-persist/integration/react'
import {store,persistorStore} from './redux'
import "./request"


import '../public/css/common/common.css'

// ReactDOM.render(<App />, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();

// ReactDOM.render(
//     <Router/>,
//     document.getElementById('root')
// );

ReactDOM.render(
    <Provider store={store}>
        <PersistGate loading={null} persistor={persistorStore}>
            <Router/>,
        </PersistGate>
    </Provider>,
    document.getElementById('root')
);

